<#assign path = request.getContextPath() />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>人脸详情</title>
		 <meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="stylesheet" href="${path}/static/css/font.css">
		<link rel="stylesheet" href="${path}/static/css/css.css">
		<link rel="stylesheet" type="text/css" href="${path}/static/css/xadmin.css"/>
		<script src="${path}/static/lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="${path}/static/js/jquery.min.js"></script>
		<script src="${path}/static/js/xadmin.js"></script>
    </head>
    <body>
		  <div class="layui-fluid">
		        <div class="layui-row layui-col-space15">
		            <div class="layui-col-md12">
		                <div class="layui-card">
		                    <div class="layui-card-body">
		                       <ul class="layui-ul">
									<li class="attribute_lists"><h4 class="attribute">姓名</h4> <span class="layui-span">${info.empName}</span></li>
									<li class="attribute_lists"><h4 class="attribute">员工编号</h4> <Span class="layui-span" id="empNo">${info.empNo}</Span></li>
									<li class="attribute_lists"><h4 class="attribute">身份证号</h4> <span class="layui-span">${info.identityNo}</span></li>
									<li class="attribute_lists"><h4 class="attribute">部门 </h4><span class="layui-span"></span>${info.deptName} </li>
									<li class="attribute_lists"><h4 class="attribute">手机号</h4> <span class="layui-span">${info.mobile}</span></li>
		                       </ul>
							   <ul class="layui-ul">
									<li class="update-pic">
										<p class="layui-span">基础照片</p>
										<ul>
											<#if basePic??>
                                                <li class="pic">

                                                    <#--<img src="${path}/static/img/index/af-logo.png"/>-->
                                                    <img src="${basePic.url}"/>
                                                </li>
                                                <li class="pic">
                                                    <button type="button" id="updateBasic" class="layui-btn" name="file">
                                                        <i class="layui-icon">&#xe67c;</i>更新照片
                                                    </button>
                                                    <p>更新时间：<span id="show">
														${basePic.createTime ? string("yyyy-MM-dd hh:mm")}
													</span></p>
                                                </li>
											</#if>
										</ul>
									</li>
									<li class="tuozhan-pic">
										<div class="tz-title">
											<p class="fl">拓展照片</p>
                                            <button type="button" id="updateOther" class="layui-btn" name="file">
                                                <i class="layui-icon">&#xe67c;</i>更新照片
                                            </button>
										</div>
										<ul>
											<#if otherPic?? && (otherPic?size> 0) >
											    <#list otherPic as item>
											        <li class="tz-pic">
                                                        <img src="${item.url}"/>
                                                        <p>${item.createTime?string("yyyy-MM-dd hh:mm")}</p>
                                                    </li>
											    </#list>
											</#if>
											<#--<li class="tz-pic">-->
												<#--<img src="${path}/static/img/index/af-logo.png"/>-->
												<#--<p>2019-07-07 12:01</p>-->
											<#--</li>-->
											<#--<li class="tz-pic">-->
												<#--<img src="${path}/static/img/index/af-logo.png"/>-->
												<#--<p>2019-07-07 12:01</p>-->
											<#--</li>-->
											<#--<li class="tz-pic">-->
												<#--<img src="${path}/static/img/index/af-logo.png"/>-->
												<#--<p>2019-07-07 12:01</p>-->
											<#--</li>-->
										</ul>
									</li>					
							   </ul>
							   <table class="layui-table" id="table">
								     <thead>
								       <tr>
								        <th>算法</th>
								        <th>类型</th>
								        <th>特征码</th>
								   		<th>操作</th>
								   	</tr>
								   </thead>
								   <tbody>
										<tr>
											<td>百度</td>
											<td>3d</td>
											<td>5ertert345235235235</td>
											<td><button type="button" class="btn-bor" onclick="member_stop()">启用</button></td>
										</tr>
										<tr>
											<td>百度</td>
											<td>3d</td>
											<td>5ertert345235235235</td>
											<td><button type="button" class="btn-bor" onclick="member_stop()">停用</button></td>
										</tr>
										<tr>
											<td>百度</td>
											<td>3d</td>
											<td>5ertert345235235235</td>
											<td><button type="button" class="btn-bor" onclick="member_stop()">启用</button></td>
										</tr>
										<tr>
											<td>百度</td>
											<td>3d</td>
											<td>5ertert345235235235</td>
											<td><button type="button" class="btn-bor" onclick="member_stop()">停用</button></td>
										</tr>
										<tr>
											<td>百度</td>
											<td>3d</td>
											<td>5ertert345235235235</td>
											<td><button type="button" class="btn-bor" onclick="member_stop()">启用</button></td>
										</tr>
										<tr>
											<td>百度</td>
											<td>3d</td>
											<td>5ertert345235235235</td>
											<td><button type="button" class="btn-bor" onclick="member_stop()">停用</button></td>
										</tr>
									 <tbody>
							   </table>
		                    </div>
		                 
		                    <div class="layui-card-body ">
		                        <div class="page">
		                            <div>
		                                <a class="prev" href="">&lt;&lt;</a>
		                                <a class="num" href="">1</a>
		                                <span class="current">2</span>
		                                <a class="num" href="">3</a>
		                                <a class="num" href="">489</a>
		                                <a class="next" href="">&gt;&gt;</a></div>
		                        </div>
		                    </div>
		                </div>
		            </div>
		        </div>
		    </div>
		</body>
		<script src="${path}/static/js/common.js"></script>
		<script>
			 /*用户-停用*/
			function member_stop(obj, id) {
			    layer.confirm('确认要停用吗？',
			    function(index) {
			
			        if ($(obj).attr('title') == '启用') {
			
			            //发异步把用户状态进行更改
			            $(obj).attr('title', '停用');
			            $(obj).find('i').html('&#xe62f;');
			
			            $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
			            layer.msg('已停用!', {
			                icon: 5,
			                time: 1000
			            });
			
			        } else {
			            $(obj).attr('title', '启用');
			            $(obj).find('i').html('&#xe601;');
			
			            $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
			            layer.msg('已启用!', {
			                icon: 5,
			                time: 1000
			            });
			        }
			
			    });
			}
          //上传
          layui.use(['jquery', 'form','upload'], function () {
              var $ = layui.jquery,
                      form=layui.form,
                      upload=layui.upload;
              //执行实例
             var baseic = upload.render({
                  elem: '#updateBasic',
                  url: '/api/employee/update/basic/pic',
                  multiple: true,
                  size:1024*1024,
                  before: function (obj) {
                      this.data = {"empNo": $('#empNo').text()};
                      layer.load();
                  },
                  done: function (res) {
                      layer.closeAll('loading');
                      console.log(res);
                      if (res.status == 200) {
                          layer.msg("上传成功",{
                              icon: 6
                          });
                          window.location.reload();
                      }

                  }
                  , error: function () {
                      layer.closeAll('loading');
                  }
              });
              //执行实例
              var other = upload.render({
                  elem: '#updateOther',
                  url: '/api/employee/update/other/pic',
                  multiple: true,
                  size:1024*1024,
                  before: function (obj) {
                      this.data = {"empNo": $('#empNo').text()};
                      layer.load();
                  },
                  done: function (res) {
                      layer.closeAll('loading');
                      console.log(res);
                      if (res.status == 200) {
                          layer.msg("上传成功",{
                                      icon: 6
                                  });
                          window.location.reload();
                      }

                  }
                  , error: function () {
                      layer.closeAll('loading');
                  }
              });

          });
		</script>
</html>